using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using Praxis.Repository.Mapping;
using Praxis.Entities;

namespace Praxis.Repository
{
    public partial class PRAXISContext : DbContext
    {
        static PRAXISContext()
        {
            Database.SetInitializer<PRAXISContext>(null);
        }

        public PRAXISContext()
            : base("Name=PRAXISContext")
        {
            this.Configuration.LazyLoadingEnabled = false;
            this.Configuration.ProxyCreationEnabled = false;
            this.Configuration.AutoDetectChangesEnabled = false;
           
        }

        public DbSet<ALQUILER> ALQUILERs { get; set; }
        public DbSet<CLIENTE> CLIENTEs { get; set; }
        public DbSet<COMPROBANTE> COMPROBANTEs { get; set; }
        public DbSet<DETALLE_ALQUILER> DETALLE_ALQUILER { get; set; }
        public DbSet<DETALLE_COMPROBANTE> DETALLE_COMPROBANTE { get; set; }
        public DbSet<DETALLE_DEVOLUCION> DETALLE_DEVOLUCION { get; set; }
        public DbSet<DETALLE_ENTREGA> DETALLE_ENTREGA { get; set; }
        public DbSet<DEVOLUCION> DEVOLUCIONs { get; set; }
        public DbSet<ENTREGA> ENTREGAs { get; set; }
        public DbSet<EQUIPO> EQUIPOes { get; set; }
        public DbSet<OBRA> OBRAs { get; set; }
        public DbSet<PAGO> PAGOes { get; set; }
        //public DbSet<sysdiagram> sysdiagrams { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new ALQUILERMap());
            modelBuilder.Configurations.Add(new CLIENTEMap());
            modelBuilder.Configurations.Add(new COMPROBANTEMap());
            modelBuilder.Configurations.Add(new DETALLE_ALQUILERMap());
            modelBuilder.Configurations.Add(new DETALLE_COMPROBANTEMap());
            modelBuilder.Configurations.Add(new DETALLE_DEVOLUCIONMap());
            modelBuilder.Configurations.Add(new DETALLE_ENTREGAMap());
            modelBuilder.Configurations.Add(new DEVOLUCIONMap());
            modelBuilder.Configurations.Add(new ENTREGAMap());
            modelBuilder.Configurations.Add(new EQUIPOMap());
            modelBuilder.Configurations.Add(new OBRAMap());
            modelBuilder.Configurations.Add(new PAGOMap());
            //modelBuilder.Configurations.Add(new sysdiagramMap());
        }
    }
}
